treeview: Simplify code
authorBenjamin Otte <otte@redhat.com>
Sat, 26 Nov 2011 02:36:45 +0000 (03:36 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 29 Nov 2011 19:44:57 +0000 (20:44 +0100)
Since the changes in commit 2b3de3dd this simplification is possible.

gtk/gtktreeview.c

index 4de41fbc59e1dfb16873e613ecd603777bbc80b0..29c6b4db3d244108b925f5f6cf5939de97a492f9 100644 (file)
@@ -10820,12 +10820,10 @@ gtk_tree_view_real_select_cursor_parent (GtkTreeView *tree_view)
            tree_view->priv->modify_selection_pressed = TRUE;
        }
 
-      gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, FALSE);
-      gtk_tree_view_clamp_node_visible (tree_view, cursor_tree, cursor_node);
+      gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, TRUE);
+      gtk_tree_path_free (cursor_path);
 
       gtk_widget_grab_focus (GTK_WIDGET (tree_view));
-      gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
-      gtk_tree_path_free (cursor_path);
 
       tree_view->priv->modify_selection_pressed = FALSE;